<template>
  <div class="visualBlock">
    <div class="syzn" @click="$router.push({path: '/nav/introduce'})">
      <img src="~static/images/m/mb4.png" alt="">
      </div>
    <div class="rzbtn" @click="doProcess">
      <img src="~static/images/m/mb3.png" alt="">
    </div>
    <!-- <div class="logout" @click="logout">退出登录</div> -->
    <router-view></router-view>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        devEnv: process.env == 'development'
      }
    },
    methods: {
      logout: function () {
        this.$store.commit("userInfo", '');
        this.$db.remove("userInfo");
        this.$router.replace({path: '/login'});
      },
      doProcess: function () {
        // 成功
        this.$router.push({path: '/process'});
        // 失败 
        /*
        this.$notify('你今天已经签到过了');
        */
      }
    },
    mounted: function () {
      // var vm = this;
      // if (!this.$store.state.isLogin) {
      //   this.$router.replace({path: '/login', query: {from: 'nav'}});
      // }
      // var check = this.$route.query.r;
      // if (check) {
      //   vm.$toast.loading({ 
      //     message: '',
      //     forbidClick: true
      //   });
      //   var user = this.$store.state.currentUser;
      //   vm.$fly('登录', 'api/checkLogin.jsp', {idCard: user.idCard}, function (data) {
      //     vm.$toast.clear();
      //     if (data.success) {
      //       var userInfo = {
      //         idCard: user.idCard,
      //         attestationId: data.data.attestationId || '',
      //         attestationId2: data.data.attestationId2 || '',
      //         type: data.data.type || '',
      //         type2: data.data.type2 || '',
      //         tip: data.data.msg,
      //         getCard: data.data.getCard,
      //         jqrz: data.data.jqrz
      //       };
      //       vm.$store.commit("userInfo", userInfo);
      //       vm.$db.set("userInfo", userInfo);
      //     }
      //   });
      // }
    }
  };
</script>

<style lang="less" scoped>
.visualBlock {
  width: 100%;
  height: 100vh;
}
.syzn { 
  img {
    width: 100%;
  }
}
.rzbtn {
  img {
    width: 90%;
    display: block;
    margin: 20px auto;
  }
}
.logout {
  width: 70px;
  text-align: center;
  background: #1051ef;
  border-radius: 5px;
  color: #fff;
  height: 24px;
  line-height: 24px;
  font-size: 12px;
  position: fixed;
  bottom: 10px;
  right: 10px;
}
</style>